import request from '@/network/request.js';


// 购物车列表  /api/leju/front/cart/cartList   参数userId


function getCartList(data) {
	return request({
		url: '/api/leju/front/cart/cartList',
		method: 'get',
		data
	})
}

// 添加到购物车  post   /api/leju/front/cart/addCart

function getAddCart(data) {
	return request({
		method: 'post',
		url: '/api/leju/front/cart/addCart',
		data
	})
}
// 提交定单 post /api/leju/front/order/addOrderBatch

function getAddOrderBatch(data) {
	return request({
		url: '/api/leju/front/order/addOrderBatch',
		method: 'post',
		data,
		header: {
			'content-type': 'application/x-www-form-urlencoded'
		}
	})
}

// 订单支付页面 post /api/leju/front/order/payConfirm

function getPayConfim(data) {
	return request({
		url: '/api/leju/front/order/payConfirm',
		method: 'post',
		header: {
			'content-type': 'application/x-www-form-urlencoded'
		},
		data
	})
}
export {
	getCartList,
	getAddCart,
	getAddOrderBatch,
	getPayConfim
}
